from Sanzhou.base.base import Base
from selenium.webdriver.common.by import By


class Page(Base):

    shuru_loc=(By.XPATH,'//*[@id="q"]')
    def shuru(self):
        self.click(self.shuru_loc)

    login_loc=(By.XPATH,'.h')
    def login(self):
        self.click(self.login_loc)

    #输入智能手机
    zhineng_loc=(By.XPATH,'//*[@id="q"]')
    def zhineng(self):
        self.send_keys(self.zhineng_loc,'智能手机')
    #执行操作
    zhixing_loc=(By.XPATH,'/html/body/div[3]/div[2]/div[1]/div/div/div[3]/div/div[1]/form/div[2]/button')
    def zhixing(self):
        self.click(self.zhineng_loc)

    #展示搜索到的页面
    yemian_loc=(By.XPATH,'/html/body/div[3]/div[2]')
    def yemian(self):
        return self.text(self.yemian_loc)

